/**
 * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com).
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springblade.modules.restaurant.service;

import cn.hutool.core.date.DateTime;
import org.springblade.modules.restaurant.entity.CommoditySummary;
import org.springblade.modules.restaurant.excel.CommoditySummaryExcel;
import org.springblade.modules.restaurant.vo.CommoditySummaryVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.math.BigDecimal;
import java.util.List;

/**
 * 货物采购汇总表 服务类
 *
 * @author Blade
 * @since 2025-02-05
 */
public interface ICommoditySummaryService extends BaseService<CommoditySummary> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param commoditySummary
	 * @return
	 */
	IPage<CommoditySummaryVO> selectCommoditySummaryPage(IPage<CommoditySummaryVO> page, CommoditySummaryVO commoditySummary);

	/**
	 * 生成商品采购汇总表
	 *
	 * @param startTime
	 * @param endTime
	 */
	void genCommoditySummary(DateTime startTime, DateTime endTime);

	/**
	 * 商品采购汇总表月汇总金额总和
	 * @param businessTime
	 * @param tenantId
	 * @return
	 */
	BigDecimal getCommoditySummaryMonthSum(String businessTime, String tenantId);

	/**
	 * 商品采购汇总表日汇总金额总和
	 *
	 * @param day      yyyy-MM-dd
	 * @param tenantId
	 * @return
	 */
	BigDecimal getCommoditySummaryDaySum(String day, String tenantId);

	/**
	 * 导出商品采购汇总表
	 *
	 * @param commoditySummaryList
	 * @return
	 */
	List<CommoditySummaryExcel> exportSummary(List<CommoditySummary> commoditySummaryList);
}
